<?php
session_start();

 if($_SESSION['fl']!=1)
{
	header("Location:home.html");
}





?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head><link rel="stylesheet" type="text/css" href="goplaces.css" />
<script type="text/javascript" src="getcode.js">
</script>

<div id="header">
		<a href="home.html" class="logo"><img src="images/logo.jpg" alt="" width="274" height="90" /></a>		
         		
  		<a class="facebook">  <iframe src="http://www.facebook.com/plugins/likebox.php?href=https%3A%2F%2Fwww.facebook.com%2Fpages%2FETrawels%2F132726943479075&amp;width=150&amp;colorscheme=light&amp;show_faces=false&amp;border_color&amp;stream=false&amp;header=false&amp;height=62" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:150px; height:80px;" allowtransparency="true"></iframe></a>
 																														
	  <a href="http://twitter.com/etrawels" class="twitter-follow-button" data-show-count="false" >Follow @etrawels</a>
<script src="http://platform.twitter.com/widgets.js" type="text/javascript"></script> 
<strong>
<a href="logout.php">Log out</a></strong>

		<ul id="menu">
            <li> </li>
            <li> </li>
            <li> </li>
            <li> </li>
            <li> </li>
			<li><a href="home.html" >Home Page</a></li>
			<li><a href="aboutus.html" >Company Profile</a></li>
			<li><a href="tours.html" >Tours and Packages</a></li>
			<li><a href="visa.html">Visa Procedures & Assistance</a></li>
			<li><a href="booking.php" >Bookings</a></li>
			<li><a href="feedback.php" >Feedback</a></li>
			<li><a href="Sitemap.html">Sitemap</a></li>
			<li><a href="maps.html" >Trip Planner</a></li>
			
	  </ul>
	</div>
    <div id="bookwrapper">
  
    <div id="bon">
 Customer Bookings
     </div>
   
   <div id="belowbookwrapper">
   <?php 


$con=mysql_connect('localhost','root','');
if(!$con)
{
  die('could not connect:'.mysql_error());
  }
  mysql_select_db("ETrawelMart",$con);
  
 
  
  $check=mysql_query("SELECT * FROM customer_booking");
  
print "<table width=984 align=\"left\"  border=1>\n"; 
print "<tr>\n";
print "<th><font face=arial size=3/>Booking ID</font></th><th><font face=arial size=3/>User ID</font></th><th><font face=arial size=3/>Trip code</font></th><th><font face=arial size=3/>passengers</font></th><th><font face=arial size=3/>Insurance</font></th><th><font face=arial size=3/>Travel Date</font></th><th><font face=arial size=3/>Payment Type</font></th><th><font face=arial size=3/>Total Cost</font></th><th><font face=arial size=3/>Delete</font></th>";
print "</tr>";

while ($row=mysql_fetch_array($check)){ 

$book_id=$row['book_id'];
$user_id=$row['user_id'];
$tripcode=$row['tripcode'];
$passengers=$row['passengers'];
$insurance=$row['insurance'];
$date_of_travel=$row['date_of_travel'];
print "<tr>\n"; 

print "\t<td><font face=arial size=3/>$book_id</font></td>\n";
print "\t<td><font face=arial size=3/>$user_id</font></td>\n"; 
print "\t<td><font face=arial size=3/>$tripcode</font></td>\n";
print "\t<td><font face=arial size=3/>$passengers</font></td>\n";
print "\t<td><font face=arial size=3/>$insurance</font></td>\n";
print "\t<td><font face=arial size=3/>$date_of_travel</font></td>\n";
$check1=mysql_query("SELECT * FROM payment WHERE book_id='$book_id'");
while( $row1=mysql_fetch_array($check1))
{
	$paymenttype=$row1['paymenttype'];
	$tot_cost=$row1['tot_cost'];
	print "\t<td><font face=arial size=3/>$paymenttype</font></td>\n";
print "\t<td><font face=arial size=3/>$tot_cost</font></td>\n"; 
}
echo "\t<td><font face=arial size=3/><a href=\"deletebook.php?book_id=$book_id\">Delete</a></font></td>\n";
print "</tr>\n"; 
} 
print "</table>\n"; 
  
  
   mysql_close($con); 
  
  
  	 
?>
<br /><br /><br />
<a href="admin1.php"><input type="button" value="Back to Admin main page" name="tourdata" style="background:#6CF" /></a>
</div>



    
    
  </div>  
    
    
    
    
    
    
    
    
    
    <div id="footer">
		<ul>
			<li></li>
			<li></li>
			<li></li>
			<li></li>
			<li><a href="home.html">Home Page</a>|</li>
			<li><a href="aboutus.html">Company Profile</a>|</li>
			<li><a href="tours.html">Tours and Packages</a>|</li>
			<li><a href="Visa.html">Visa Procedures & Assistance</a>|</li>
            <li><a href="Bookings.html">Bookings</a>|</li>
			<li><a href="Feedback.html">Feedback</a>|</li>
			<li><a href="Sitemap.html">Sitemap</a>|</li>
			<li><a href="Tripplanner.html">Trip Planner</a>|</li>
		</ul>
																																																					
	</div>
   
<body>
</body>
</html>